<?php /* Smarty version Smarty-3.1.8, created on 2012-06-14 07:47:32
         compiled from "../includes/interface/templates\animalRechercher.tpl" */ ?>
<?php /*%%SmartyHeaderCode:171384fd8a21e75edc1-73406321%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '843ca94b295e113240e9ee63247979f1468d9939' => 
    array (
      0 => '../includes/interface/templates\\animalRechercher.tpl',
      1 => 1339659970,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '171384fd8a21e75edc1-73406321',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_4fd8a21ea16d88_64133178',
  'variables' => 
  array (
    'typeAnimal' => 0,
    'listeCouleur' => 0,
    'couleurSelected' => 0,
    'groupe' => 0,
    'listeAnimaux' => 0,
    'record' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_4fd8a21ea16d88_64133178')) {function content_4fd8a21ea16d88_64133178($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_options')) include 'C:\\wamp\\www\\trunk\\includes\\interface\\smarty\\libs\\plugins\\function.html_options.php';
if (!is_callable('smarty_function_cycle')) include 'C:\\wamp\\www\\trunk\\includes\\interface\\smarty\\libs\\plugins\\function.cycle.php';
?><!-- TEMPLATE ANIMAL RECHERCHER -->

<section id="content">


<h1 class="article"><?php echo $_smarty_tpl->getConfigVariable('ANIMAL_RECHERCHER');?>
</h1>

<form name="formulaire" action="?action=rechercherAnimal" method="post" class="article buttons">
    
    <fieldset class="form-text">
        <label><?php echo $_smarty_tpl->getConfigVariable('NOM');?>
</label>
        <input type="text" name="nom" id="nom" class="validate[optional,custom[onlyLetter],length[0,12]] text-input"/>
    </fieldset>
    <fieldset class="form-text">
        <label><?php echo $_smarty_tpl->getConfigVariable('DEUXIEME_NOM');?>
</label>
        <input type="text" name="secondNom" id="secondNom" class="validate[optional,custom[onlyLetter],length[0,12]] text-input" />
    </fieldset>
    <fieldset>
       	<label><?php echo $_smarty_tpl->getConfigVariable('SEXE');?>
</label>
        <select name="sexe" id="sexe" class="validate[optional]">
        	<option value="null">---</option>
        	<option value="Male"><?php echo $_smarty_tpl->getConfigVariable('MALE');?>
</option>
            <option value="Femelle"><?php echo $_smarty_tpl->getConfigVariable('FEMELLE');?>
</option>
            <option value="Indetermine"><?php echo $_smarty_tpl->getConfigVariable('INDETERMINE');?>
 </option>
    	</select>
    </fieldset> 
 <fieldset>
 	<label><?php echo $_smarty_tpl->getConfigVariable('TYPE_ANIMAL');?>
</label>
    <select name="TypeAnimal" onchange="showRaces(this.value)">
    	<option value="null">---</option>
        <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']["unType"])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['name'] = "unType";
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['typeAnimal']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["unType"]['total']);
?>
        <option value=<?php echo $_smarty_tpl->tpl_vars['typeAnimal']->value[$_smarty_tpl->getVariable('smarty')->value['section']['unType']['index']]->getNom();?>
><?php echo $_smarty_tpl->tpl_vars['typeAnimal']->value[$_smarty_tpl->getVariable('smarty')->value['section']['unType']['index']]->getNom();?>
</option>
        <?php endfor; endif; ?>
        </select>
 </fieldset>
 <fieldset>
 	<label><?php echo $_smarty_tpl->getConfigVariable('COULEUR');?>
</label>
    	<select name="couleur">
        <option value="null">---</option>
        <?php echo smarty_function_html_options(array('output'=>$_smarty_tpl->tpl_vars['listeCouleur']->value,'values'=>$_smarty_tpl->tpl_vars['listeCouleur']->value,'selected'=>$_smarty_tpl->tpl_vars['couleurSelected']->value),$_smarty_tpl);?>

        </select>
</fieldset>  
<fieldset>
	<label><?php echo $_smarty_tpl->getConfigVariable('RACE');?>
</label>
    <select name="TypeRace" id="txtHint">
        <option value="null">---</option>
    </select>         
</fieldset>

<fieldset class="form-actions">
    <input type="submit" class="submit" name="rechercherAnimal" value="<?php echo $_smarty_tpl->getConfigVariable('RECHERCHER');?>
" />
</fieldset>
    
</form>

    
<h2 class="article"><?php echo $_smarty_tpl->getConfigVariable('RESULTAT_RECHERCHE');?>
</h2>
   

	 <table class="article" id="tableauRecherche">
        <thead>
            <tr>
                <th width="20"><?php echo $_smarty_tpl->getConfigVariable('ID');?>
</th>
                <th width="70"><?php echo $_smarty_tpl->getConfigVariable('NOM');?>
</th>
                <th width="80"> <?php echo $_smarty_tpl->getConfigVariable('DEUXIEME_NOM');?>
</th>
                <th width="100"><?php echo $_smarty_tpl->getConfigVariable('TYPE_ANIMAL');?>
</th>
                <th width="70"><?php echo $_smarty_tpl->getConfigVariable('SEXE');?>
</th>
                <?php if ((isset($_smarty_tpl->tpl_vars['groupe']->value))&&($_smarty_tpl->tpl_vars['groupe']->value=='Super Administrateurs')){?>
                <th></th>
                <?php }?>
            </tr> 
        </thead>
        <tbody>
            <?php if (isset($_smarty_tpl->tpl_vars['listeAnimaux']->value)){?>
                <?php  $_smarty_tpl->tpl_vars['record'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['record']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['listeAnimaux']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['record']->key => $_smarty_tpl->tpl_vars['record']->value){
$_smarty_tpl->tpl_vars['record']->_loop = true;
?>
                    <tr class="<?php echo smarty_function_cycle(array('values'=>"ligne1,ligne2"),$_smarty_tpl);?>
">
                        <td><a href ="?action=afficherAnimal&id=<?php echo $_smarty_tpl->tpl_vars['record']->value->getId();?>
"><?php echo $_smarty_tpl->tpl_vars['record']->value->getId();?>
</a></td>
                        <td><?php echo $_smarty_tpl->tpl_vars['record']->value->getNom();?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['record']->value->getSecondNom();?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['record']->value->getTypeDeRace_nom();?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['record']->value->getSexe();?>
</td>
                        <?php if ((isset($_smarty_tpl->tpl_vars['groupe']->value))&&($_smarty_tpl->tpl_vars['groupe']->value=='Super Administrateurs')){?>
                        <td><a href="?action=afficherSupprimerAnimal&id=<?php echo $_smarty_tpl->tpl_vars['record']->value->getId();?>
"><?php echo $_smarty_tpl->getConfigVariable('SUPPRIMER');?>
</a></td>
                        <?php }?>
                    </tr>
                <?php } ?>    
            <?php }?>     
        </tbody>  

</div>

</section><?php }} ?>